home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3821 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.8 KB

  1. Path: pomona.edu!JLAMPORT
  2. From: jlamport@pomona.edu (His Holiness the Pope)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: can you help me learn programming ?
  5. Date: Fri, 26 Jan 1996 08:32:53 GMT
  6. Organization: Pomona College
  7. Message-ID: <0099CF0E.4B42DDD1@pomona.edu>
  8. References: <sg19-2101960200070001@128.253.183.75>,<4e49fe$qks@news.iconn.net>
  9. Reply-To: jlamport@pomona.edu
  10. NNTP-Posting-Host: thumper.pomona.edu
  11.  
  12. >In article <sg19-2101960200070001@128.253.183.75>, sg19@cornell.eduW says...
  13. >>
  14. >>Hi,
  15. >>I know nothing about computer programming but I am eager to learn.
  16. >>
  17. >>Can any kind soul suggest to me any good, comprehensive book (but for
  18. >>absolute beginners) to learn how to programme in Visual Basic 4.0 (to move
  19. >>onto Windows 95 programming) and Visual C/C ++ that include CD-Roms for
  20. >>online help and such?
  21.  
  22. If you want to start out programming in C or C++, I have only one piece of
  23. advice: don't.  The features of C/C++ are designed to be convenient for people
  24. who are already well acquainted with computer programming, and are positively
  25. destructive to the sanity of those who aren't.  
  26.  
  27. The main problem, as I see it, with learning to program in C/C++ is that the
  28. syntax often conflates various concepts which are _similar_ but not
  29. _identical_, making it extremely hard for the beginner to clearly understand
  30. the concepts behind the syntax. (I'm thinking in particular of the numerous and
  31. subtly different uses of & and *, which muddy the distinction between address,
  32. pointer, and reference, -- especially when passing a variable to a function --
  33. for example.)  Fortunately, I learned C++ after having already learned a number
  34. of other languages -- BASIC, Logo (a remarkably elegant language considering it
  35. was designed for kids), Pascal, DCL, and have dabbled with assembly-language --
  36. so I was already familiar and comfortable with such things as pointers and
  37. passing a variable by value or by reference, and the difference between a
  38. statement and an expression and between a procedure and a function (both
  39. important distinctions to understand, even if C++ doesn't make them).  I think
  40. if I had had to learn these concepts using C++ I would have been hopelessly
  41. confused.
  42.  
  43. Personally, I would recommend Pascal as a good language to learn on: it's
  44. simple, elegant, and powerful.  Moreover, it was originally designed as a
  45. teaching language, and well-designed at that, so its syntax actually represents
  46. the underlying concepts very well; and its somewhat more restrictive
  47. syntax encourages good programming style. (For example, the absense of a
  48. "break" statement makes you think carefully about entrance and exit conditions
  49. in loops and other conditionals, discouraging "spaghetti code".)
  50.  
  51. And I agree with many of the other people who have responded: don't start out
  52. trying to program Windows apps.  Start with DOS.
  53.  
  54. Hope this helps.
  55.  
  56. -jason
  57.